
<!--link href="/static/plugs/layui/css/layui.css" rel="stylesheet"-->
<style>
    .cat_item{
        color: #000;
    text-decoration: none;
    
    }
    .cat_li{
        
    list-style-type: disclosure-closed;
    }
</style>

<body class="layui-bg-gray">
<div class="layui-panel" style="width: 100%; margin: 16px;">
  <ul class="layui-menu" id="demo-menu">
      {foreach $cat_arr as $k=>$v}
          <li class="layui-menu-item-group layui-menu-item-down" style="float:left;margin-right:50px;line-height:30px">
            {if empty($v.sub)}
            <a class="layui-menu-body-title cat_item" href="/index/index/plist?cat={$v.id}">{$v.name}</a>
            {else}
            <div class="layui-menu-body-title">{$v.name}</div>
            <ul>
                {foreach $v.sub as $sk=>$sv}
                
                   {if empty($sv.sub)}
                   <li class=cat_li>
                    <a class="layui-menu-body-title cat_item" href="/index/index/plist?cat={$sv.id}">{$sv.name}</a>
                   {else}
                   <li>
                   <div class="layui-menu-body-title">{$sv.name}</div>
                      <ul>
                          {foreach $sv.sub as $dk=>$dv}
                          <li class="layui-menu-item-checked cat_li">
                              <a class="layui-menu-body-title cat_item" href="/index/index/plist?cat={$dv.id}">{$dv.name}</a>
                          </li>
                          {/foreach}
                      </ul>
                   {/if}
                </li>
                {/foreach}
            </ul>
            {/if}
          </li>
      {/foreach}
    
    
      <!--li class="layui-menu-item-group layui-menu-item-down" style="float:left;line-height:30px">
      <div class="layui-menu-body-title">menu group3</div>
      <ul>
        <li>
          <div class="layui-menu-body-title">menu item 3-1</div>
        </li>
        <li class="layui-menu-item-group" lay-options="{type: 'group', isAllowSpread: false}">
          <div class="layui-menu-body-title">menu group 2</div>
          <ul>
            <li class="layui-menu-item-checked">
              <div class="layui-menu-body-title">menu item 3-2-1</div>
            </li>
            <li><div class="layui-menu-body-title">menu item 3-2-2</div></li>
          </ul>
        </li>
        <li><div class="layui-menu-body-title">menu item 3-3</div></li>
      </ul>
    </li-->
    
  </ul>
</body>